package com.service.healthycode.dto;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;

import java.util.Date;

/**
 * @author: hjl
 * @date: 2022/04/24 14:07
 * @description
 */
@Data
public class ExportDangerDto {
    @ExcelProperty("终端mac地址")
    private String terminalMac;
    /**
     * 4:确诊；3:密接；2：次密接；1-低风险;0-无风险
     */
    @ExcelIgnore
    private Integer status;
    @ExcelProperty("危险程度")
    private String statusStr;
    @ExcelProperty("起始时间")
    private Date startDate;
    @ExcelProperty("结束时间")
    private Date endData;
    @ExcelProperty("时间阈值")
    private String time;

    public String getStatusStr() {
        switch (status){
            case 4:
                return "确诊";
            case 3:
                return "密接";
            case 2:
                return "次密接";
            case 1:
                return "低风险";
            default:
                return statusStr;
        }
    }
}
